<?php

class NewsHelper extends AppHelper {
    public function coundDate($nextDate) {
        $timeDiff = abs( strtotime($nextDate) - time() );
        $numberDays = $timeDiff/86400;  // 86400 seconds in one day

        // and you might want to convert to integer
        $numberDays = intval($numberDays);
        
        return $numberDays;
    }
}
?>
